package cn.itlaobing.service;

import cn.itlaobing.dao.TrainDao;
import cn.itlaobing.exception.MyException;
import cn.itlaobing.model.DtoTrainModel;

import java.sql.SQLException;

/**
 * Created by Administrator on 2017-11-09.
 */
public class TrainService {
    private TrainDao td=new TrainDao();
    public DtoTrainModel QueryAll(String stationNum, String name1, String name2 ) throws MyException
    {
        try {
            return td.QueryAll(stationNum,name1,name2);
        } catch (SQLException e) {
            e.printStackTrace();
            throw  new MyException(e.getMessage());
        }
    }
}
